<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>权限管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- 确保适当的绘制和触屏缩放 -->
    <link rel="stylesheet" href="{$url_css}bootstrap.min.css" type="text/css">
    <link rel="stylesheet" href="{$url_css}admin.css" type="text/css">

    <script type="text/javascript" src="{$url_js}jquery-1.12.0.min.js"></script>
</head>
<body>
    <div class="container" style="width:96%">
        <form action="auth.php?do=addgroup" method="POST">
            <table class="table table-bordered table-striped" align="center" id="list">
                <tr><td colspan="6">添加管理组</td></tr>
                <tr>
                    <td class="col-xs-1 vc">管理组名称</td>
                    <td class="col-xs-2"><input type="text" class="form-control" name="group_name" placeholder=""></td>
                    <td class="col-xs-9"><input type="submit" class="btn btn-default" value="添加"></td>
                </tr>
            </table>
        </form>
        <div class="page-header">
              <h3>管理组列表</h3>
        </div>
        <table class="table table-bordered table-striped" align="center">
            {foreach $group as $v}
            <tr>
                <td style="width:160px;">{$v.GroupName}</td>
                <td>
                    <div class="btn-group" role="group" aria-label="...">
                        <a href="auth.php?do=edit&id={$v.AdminGroupId}" class="btn btn-default">修改权限</a>
                        <a href="?do=del&id={$v.AdminGroupId}" class="btn btn-danger delete">删除</a>
                    </div></td>
            </tr>
            {/foreach}
        </table>

    </div>

    <script type="text/javascript">
        {literal}
            $(".delete").click(function(){
                var url = self.location.pathname + $(this).attr("href");
                top.__confirm('确定要删除吗？','删除后不可恢复！', url, self);
                return false;
            })
        {/literal}
    </script>
</body>
<html>
    